<?php
/**
 * 读取，读取指定项目（分类，标记，MAKE）
 * @author wangtao
 * @version 20101029
 */

/**
 * 读取某一篇日志
 * @param int $id	日志ID
 */
function readOneAJAX($id)
{
	$db = mysqlDB::con();
	$sqlFinal = 'SELECT `Pid` FROM `post_into` ORDER BY `post_into`.`Pid` DESC LIMIT 0 , 1';
	$sqlFirst = 'SELECT `Pid` FROM `post_into` ORDER BY `post_into`.`Pid` ASC LIMIT 0 , 1';
	$sql = 'SELECT * FROM `post_into` WHERE `Pid` = \'' . $id . '\'';
	$final = $db->query2one($sqlFinal);
	$first = $db->query2one($sqlFirst);
	$pager = http::onePageAJAX($first, $final, $id);
	$post = $db->fetch1line($sql);
	Xtmp::readOne($post, $pager);
}